//
//  zhikouonePageTableViewCell.m
//  UI_HLJ_Frame
//
//  Created by  毕宏伟 on 15/7/6.
//  Copyright (c) 2015年 毕宏伟. All rights reserved.
//

#import "zhikouonePageTableViewCell.h"

#define WIDHT self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height

@implementation zhikouonePageTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.leftImage = [[UIImageView alloc]init];
        self.leftImage.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.leftImage];
        [_leftImage release];
        
        self.titleLabel =[[UILabel alloc]init];
//        self.titleLabel.backgroundColor = [UIColor greenColor];
        [self.contentView addSubview:self.titleLabel];
        [_titleLabel release];
    
        
        self.addressLabel = [[UILabel alloc]init];
//        self.addressLabel.backgroundColor = [UIColor yellowColor];
        [self.contentView addSubview:self.addressLabel];
        // 两行显示
        self.addressLabel.numberOfLines = 2;
        // 断行
        self.addressLabel.lineBreakMode = NSLineBreakByTruncatingMiddle;
        // 字体大小14
        self.addressLabel.font = [UIFont systemFontOfSize:13];
        [_addressLabel release];
        
    }
    return self;
}



- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.leftImage.frame = CGRectMake(WIDHT / 37.5, 10, WIDHT / 2.5, 100);
    
    self.titleLabel.frame = CGRectMake(WIDHT / 2.2, 10, WIDHT / 2.5, 30);
    
    self.addressLabel.frame = CGRectMake(WIDHT / 2.2, 50, WIDHT / 2, 60);
    
}





- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
